using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace Megaplan.API.Models
{
    [JsonObject(MemberSerialization.OptIn)]
    public class DeadlineChange
    {
        [JsonProperty]
        public int Id { get; set; }

        [JsonProperty]
        public string Request { get; set; }   
    
        [JsonProperty]
        public DateTime? Deadline { get; set; }

        [OnError]
        internal void OnError(StreamingContext context, ErrorContext errorContext)
        {
            errorContext.Handled = true;
        }
    }
}